package com.lvcoding.customize.social;

import org.springframework.security.core.authority.AuthorityUtils;
import org.springframework.security.core.userdetails.User;

/**
 * @author wuyanshen
 * @description 短信登录实现
 */
public class SmsLoginHandler extends AbstractLoginHandler {

    @Override
    public String identify(String phone) {
        return phone;
    }

    @Override
    public User userInfo(String phone) {
        return new User(phone, "N/A", AuthorityUtils.createAuthorityList("cup:user:view", "cup:user:add"));
    }
}
